DLPX-93763 GCP cloud-init may allow privileged user creation #108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Recently, a customer provided examples of privileged shell access with a custom user created on a GCP deployment. This seemed to indicate that an arbitrary user was created, possibly during VM creation.
In further review and discussion with others in #dlpx-gcp Slack room, it appears that user-metadata can be leveraged to ‘insert’ operations via cloud-init and thereby create additional users on the Delphix VM.
Originally Delphix removed the module `users-groups` from cloud.cfg.tmpl to avoid this issue of being able to create a user. 2 yrs ago, upstream changed the format of the cloud init modules to use underscores rather than hyphens. During a merge conflict, we inadvertently merged the unwanted `users_groups` back into cloud.init.Problem
canonical/cloud-init#4272
Solution
Remove
users_groupsfrom cloud.cfg.tmplTesting Done
https://selfservice-jenkins.eng-tools-prd.aws.delphixcloud.com/job/appliance-build-orchestrator-pre-push/10685/
Note: upgrade failed due to know bug https://perforce.atlassian.net/browse/DLPX-93809